package com.example.demo.config;
import com.example.demo.entity.User;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


@Configuration
public class UserConfig {
    //将此返回的值生成一个bean
    @Bean
    public User user() {
        User user = new User();
        user.setId(1);
        user.setName("zhangsan");
        return user;
    }

}
